﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="TreeCondition.aspx.cs" Inherits="Mang24k99.Web.TreeView.TreeCondition" 
    Title="树结构数据表条件配置" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
   
    function GoEdit(id)
    {
        
        var pageUrl="Edit.aspx";
        pageUrl=pageUrl+"?id="+id;
        GoPageUrl(pageUrl);
        return false;
    }
    
    $(document).ready(
        function ()
        {
           addTrHover("Table1");
           InitialMsg();
       
        }
    )
    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div>
            <table class="nav_Table1" border="0" cellpadding="0" cellspacing="0" width="100%"
                height="34">
                <tr>
                    <td class="nav">
                       <asp:Label runat="server" ID="lblNav" Text="导航{0}"></asp:Label>
                    </td>
                </tr>
            </table>
            <br />
           
            <br />
            <table width="100%">
                <tr>
                    <td>
                    <table style="width: 100%;" class="tb_table2">
                <tr>
                    <td class="tb_title1" style="width:20%;">
                        <asp:Label ID="lblTreeNO" runat="server" Text="树结构名称:"></asp:Label>
                    </td>
                    <td class="tb_txt1">
                        <asp:DropDownList ID="ddlKtCommTreeconfig" runat="server" CssClass="forms" 
                            AutoPostBack="true" 
                            onselectedindexchanged="ddlKtCommTreeconfig_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr class="hidden">
                    <td class="tb_title1">
                        <asp:Label ID="lblCondNO" runat="server" Text="条件编号:"></asp:Label>
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtCondNO" runat="server" CssClass="forms" MaxLength="10"></asp:TextBox><div id='divMsgtxtCondNO' class='msg'><span style='color:red'>*</span>值要在0到2147483647之间</div>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1">
                        <asp:Label ID="lblFieldName" runat="server" Text="表字段名称:"></asp:Label>
                    </td>
                    <td class="tb_txt1">
                         <asp:DropDownList ID="ddlTextField" runat="server" >
                         </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1">
                        <asp:Label ID="lblFieldValue" runat="server" Text="条件值:"></asp:Label>
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtFieldValue" runat="server" CssClass="forms" Width="60%" MaxLength="30"></asp:TextBox><div id='divMsgtxtFieldValue' class='msg'>限30字符</div>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1">
                        <asp:Label ID="lblCondType" runat="server" Text="条件类型:"></asp:Label>
                    </td>
                    <td class="tb_txt1">
                        <asp:DropDownList ID="ddlCondType" runat="server">
                            <asp:ListItem Selected="True" Value="1">传入参数</asp:ListItem>
                            <asp:ListItem Value="2">配置值</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
                    </td>
                </tr>
            </table>
            <table style="width: 200px; text-align: center" align="center">
                <tr>
                    <td style="white-space: nowrap">
                        <asp:Button ID="btnSave" runat="server" Text="添 加" CssClass="form_btn" OnClick="btnSave_Click" />
                    </td>
                    <td style="white-space: nowrap">
                        <asp:Button ID="btnReturn" runat="server" OnClientClick="return ConfirmCancel()"
                            Text="取 消" CssClass="form_btn" OnClick="btnReturn_Click" />
                    </td>
                </tr>
            </table>
            <br />
            <table id="Table1" class="tb_table2" >
                <asp:Repeater ID="Repeater1" runat="server" OnPreRender="Repeater1_PreRender" OnItemCommand="Repeater1_ItemCommand">
                    <HeaderTemplate>
                        <thead>
                            <tr>
                                <th class="tb_title2">
                                    序号
                                </th>
                                <th class="tb_title2">
                                    表字段名称
                                </th>
                                <th class="tb_title2">
                                    条件值
                                </th>
                                <th class="tb_title2">
                                    条件类型
                                </th>
                                <th class="tb_title2">
                                    操作选项
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td class="tb_txt2">
                                <asp:Label ID="Label1" runat="server" Text='<%#Container.ItemIndex+1 %>'></asp:Label>
                            </td>
                            <td class="tb_txt2">
                                <asp:Label runat="server" ID="lblFieldName" Text='<%#Common.PageHelper.HtmlEncode(Eval("FieldName"))%>'></asp:Label>
                            </td>
                            <td class="tb_txt2">
                                <asp:Label runat="server" ID="lblFieldValue" Text='<%#Common.PageHelper.HtmlEncode(Eval("FieldValue"))%>'></asp:Label>
                            </td>
                            <td class="tb_txt2">
                                <asp:Label runat="server" ID="lblCondType" Text='<%#GetType((int)Eval("CondType"))%>'></asp:Label>
                            </td>
                            <td class="tb_txt2">
                                <asp:Button runat="server" ID="btnModify" CssClass="form_btn"  Text="修改"  CommandName="modify" CommandArgument='<%#Eval("CondNO") %>'  />
                                <asp:Button runat="server" ID="btnDelete" CssClass="form_btn" Text="删除"  CommandName="delete" CommandArgument='<%#Eval("CondNO") %>'  OnClientClick="return ConfirmDelete()" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </tbody>
                    </FooterTemplate>
                </asp:Repeater>
            </table>
            <%if (this.Repeater1.Controls.Count == 0)
              {
                  Response.Write("记录数目为0");
              } %>
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="尾页"
                NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged" PrevPageText="上一页"
                ShowInputBox="Always" SubmitButtonText="GO" AlwaysShow="True" CssClass="AspNetPager"
                CustomInfoHTML="  共&lt;span class=&quot;AspNetPager_current&quot;&gt;{0}&lt;/span&gt;页"
                CurrentPageButtonClass="AspNetPager_current" CustomInfoClass="AspNetPager_custom"
                HorizontalAlign="Right" InputBoxClass="AspNetPager_txt" SubmitButtonClass="AspNetPager_btn"
                CurrentPageButtonStyle="" PagingButtonSpacing="1px" ShowCustomInfoSection="Right">
            </webdiyer:AspNetPager>
        </div>
</asp:Content>
